
<!DOCTYPE html>

<html>
  
<!-- Mirrored from docs.sympy.org/latest/modules/geometry/ellipses.html by HTTrack Website Copier/3.x [XR&CO'2014], Sat, 15 Jan 2022 03:26:14 GMT -->
<!-- Added by HTTrack --><meta http-equiv="content-type" content="text/html;charset=utf-8" /><!-- /Added by HTTrack -->
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />

    <title>Ellipses &#8212; SymPy 1.9 documentation</title>
    <link rel="stylesheet" type="text/css" href="../../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../../_static/default.css" />
    <link rel="stylesheet" type="text/css" href="../../_static/graphviz.css" />
    <link rel="stylesheet" type="text/css" href="../../_static/plot_directive.css" />
    <link rel="stylesheet" type="text/css" href="../../../../live.sympy.org/static/live-core.css" />
    <link rel="stylesheet" type="text/css" href="../../../../live.sympy.org/static/live-autocomplete.css" />
    <link rel="stylesheet" type="text/css" href="../../../../live.sympy.org/static/live-sphinx.css" />
    
    <script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js"></script>
    <script src="../../_static/jquery.js"></script>
    <script src="../../_static/underscore.js"></script>
    <script src="../../_static/doctools.js"></script>
    <script src="../../../../live.sympy.org/static/utilities.js"></script>
    <script src="../../../../live.sympy.org/static/external/classy.js"></script>
    <script src="../../../../live.sympy.org/static/live-core.js"></script>
    <script src="../../../../live.sympy.org/static/live-autocomplete.js"></script>
    <script src="../../../../live.sympy.org/static/live-sphinx.js"></script>
    <script async="async" src="../../../../cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest8331.js?config=TeX-AMS_HTML-full"></script>
    <script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"inlineMath": [["\\(", "\\)"]], "displayMath": [["\\[", "\\]"]]}})</script>
    
    <link rel="shortcut icon" href="../../_static/sympy-notailtext-favicon.ico"/>
    <link href="ellipses.html" rel="canonical" />
    
    <link rel="index" title="Index" href="../../genindex.html" />
    <link rel="search" title="Search" href="../../search.html" />
    <link rel="next" title="Polygons" href="polygons.html" />
    <link rel="prev" title="Curves" href="curves.html" /> 
  </head><body>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="polygons.html" title="Polygons"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="curves.html" title="Curves"
             accesskey="P">previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="../../index.html">SymPy 1.9 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="../index.html" >SymPy Modules Reference</a> &#187;</li>
          <li class="nav-item nav-item-2"><a href="index.html" accesskey="U">Geometry</a> &#187;</li>
        <li class="nav-item nav-item-this"><a href="#">Ellipses</a></li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <section id="module-sympy.geometry.ellipse">
<span id="ellipses"></span><h1>Ellipses<a class="headerlink" href="#module-sympy.geometry.ellipse" title="Permalink to this headline">¶</a></h1>
<dl class="py class">
<dt class="sig sig-object py" id="sympy.geometry.ellipse.Ellipse">
<em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">sympy.geometry.ellipse.</span></span><span class="sig-name descname"><span class="pre">Ellipse</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">center</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">hradius</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">vradius</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">eccentricity</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/geometry/ellipse.py#L36-L1487"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.geometry.ellipse.Ellipse" title="Permalink to this definition">¶</a></dt>
<dd><p>An elliptical GeometryEntity.</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>center</strong> : Point, optional</p>
<blockquote>
<div><p>Default value is Point(0, 0)</p>
</div></blockquote>
<p><strong>hradius</strong> : number or SymPy expression, optional</p>
<p><strong>vradius</strong> : number or SymPy expression, optional</p>
<p><strong>eccentricity</strong> : number or SymPy expression, optional</p>
<blockquote>
<div><p>Two of <span class="math notranslate nohighlight">\(hradius\)</span>, <span class="math notranslate nohighlight">\(vradius\)</span> and <span class="math notranslate nohighlight">\(eccentricity\)</span> must be supplied to
create an Ellipse. The third is derived from the two supplied.</p>
</div></blockquote>
</dd>
<dt class="field-even">Raises</dt>
<dd class="field-even"><p><strong>GeometryError</strong></p>
<blockquote>
<div><p>When <span class="math notranslate nohighlight">\(hradius\)</span>, <span class="math notranslate nohighlight">\(vradius\)</span> and <span class="math notranslate nohighlight">\(eccentricity\)</span> are incorrectly supplied
as parameters.</p>
</div></blockquote>
<p><strong>TypeError</strong></p>
<blockquote>
<div><p>When <span class="math notranslate nohighlight">\(center\)</span> is not a Point.</p>
</div></blockquote>
</dd>
</dl>
<p class="rubric">Notes</p>
<p>Constructed from a center and two radii, the first being the horizontal
radius (along the x-axis) and the second being the vertical radius (along
the y-axis).</p>
<p>When symbolic value for hradius and vradius are used, any calculation that
refers to the foci or the major or minor axis will assume that the ellipse
has its major radius on the x-axis. If this is not true then a manual
rotation is necessary.</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">Ellipse</span><span class="p">,</span> <span class="n">Point</span><span class="p">,</span> <span class="n">Rational</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e1</span> <span class="o">=</span> <span class="n">Ellipse</span><span class="p">(</span><span class="n">Point</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span> <span class="mi">5</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e1</span><span class="o">.</span><span class="n">hradius</span><span class="p">,</span> <span class="n">e1</span><span class="o">.</span><span class="n">vradius</span>
<span class="go">(5, 1)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e2</span> <span class="o">=</span> <span class="n">Ellipse</span><span class="p">(</span><span class="n">Point</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="mi">1</span><span class="p">),</span> <span class="n">hradius</span><span class="o">=</span><span class="mi">3</span><span class="p">,</span> <span class="n">eccentricity</span><span class="o">=</span><span class="n">Rational</span><span class="p">(</span><span class="mi">4</span><span class="p">,</span> <span class="mi">5</span><span class="p">))</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e2</span>
<span class="go">Ellipse(Point2D(3, 1), 3, 9/5)</span>
</pre></div>
</div>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="#sympy.geometry.ellipse.Circle" title="sympy.geometry.ellipse.Circle"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Circle</span></code></a></p>
</div>
<p class="rubric">Attributes</p>
<table class="docutils align-default">
<colgroup>
<col style="width: 58%" />
<col style="width: 42%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p>center</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p>hradius</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p>vradius</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p>area</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p>circumference</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p>eccentricity</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p>periapsis</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p>apoapsis</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p>focus_distance</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p>foci</p></td>
<td></td>
</tr>
</tbody>
</table>
<dl class="py property">
<dt class="sig sig-object py" id="sympy.geometry.ellipse.Ellipse.apoapsis">
<em class="property"><span class="pre">property</span> </em><span class="sig-name descname"><span class="pre">apoapsis</span></span><a class="headerlink" href="#sympy.geometry.ellipse.Ellipse.apoapsis" title="Permalink to this definition">¶</a></dt>
<dd><p>The apoapsis of the ellipse.</p>
<p>The greatest distance between the focus and the contour.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p><strong>apoapsis</strong> : number</p>
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">Point</span><span class="p">,</span> <span class="n">Ellipse</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">p1</span> <span class="o">=</span> <span class="n">Point</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e1</span> <span class="o">=</span> <span class="n">Ellipse</span><span class="p">(</span><span class="n">p1</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e1</span><span class="o">.</span><span class="n">apoapsis</span>
<span class="go">2*sqrt(2) + 3</span>
</pre></div>
</div>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<dl class="simple">
<dt><a class="reference internal" href="#sympy.geometry.ellipse.Ellipse.periapsis" title="sympy.geometry.ellipse.Ellipse.periapsis"><code class="xref py py-obj docutils literal notranslate"><span class="pre">periapsis</span></code></a></dt><dd><p>Returns shortest distance between foci and contour</p>
</dd>
</dl>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.geometry.ellipse.Ellipse.arbitrary_point">
<span class="sig-name descname"><span class="pre">arbitrary_point</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">parameter</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'t'</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/geometry/ellipse.py#L214-L253"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.geometry.ellipse.Ellipse.arbitrary_point" title="Permalink to this definition">¶</a></dt>
<dd><p>A parameterized point on the ellipse.</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>parameter</strong> : str, optional</p>
<blockquote>
<div><p>Default value is ‘t’.</p>
</div></blockquote>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><strong>arbitrary_point</strong> : Point</p>
</dd>
<dt class="field-odd">Raises</dt>
<dd class="field-odd"><p><strong>ValueError</strong></p>
<blockquote>
<div><p>When <span class="math notranslate nohighlight">\(parameter\)</span> already appears in the functions.</p>
</div></blockquote>
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">Point</span><span class="p">,</span> <span class="n">Ellipse</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e1</span> <span class="o">=</span> <span class="n">Ellipse</span><span class="p">(</span><span class="n">Point</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">2</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e1</span><span class="o">.</span><span class="n">arbitrary_point</span><span class="p">()</span>
<span class="go">Point2D(3*cos(t), 2*sin(t))</span>
</pre></div>
</div>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="points.html#sympy.geometry.point.Point" title="sympy.geometry.point.Point"><code class="xref py py-obj docutils literal notranslate"><span class="pre">sympy.geometry.point.Point</span></code></a></p>
</div>
</dd></dl>

<dl class="py property">
<dt class="sig sig-object py" id="sympy.geometry.ellipse.Ellipse.area">
<em class="property"><span class="pre">property</span> </em><span class="sig-name descname"><span class="pre">area</span></span><a class="headerlink" href="#sympy.geometry.ellipse.Ellipse.area" title="Permalink to this definition">¶</a></dt>
<dd><p>The area of the ellipse.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p><strong>area</strong> : number</p>
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">Point</span><span class="p">,</span> <span class="n">Ellipse</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">p1</span> <span class="o">=</span> <span class="n">Point</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e1</span> <span class="o">=</span> <span class="n">Ellipse</span><span class="p">(</span><span class="n">p1</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e1</span><span class="o">.</span><span class="n">area</span>
<span class="go">3*pi</span>
</pre></div>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.geometry.ellipse.Ellipse.auxiliary_circle">
<span class="sig-name descname"><span class="pre">auxiliary_circle</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/geometry/ellipse.py#L1018-L1032"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.geometry.ellipse.Ellipse.auxiliary_circle" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a Circle whose diameter is the major axis of the ellipse.</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">Ellipse</span><span class="p">,</span> <span class="n">Point</span><span class="p">,</span> <span class="n">symbols</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span> <span class="o">=</span> <span class="n">Point</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">Ellipse</span><span class="p">(</span><span class="n">c</span><span class="p">,</span> <span class="mi">8</span><span class="p">,</span> <span class="mi">7</span><span class="p">)</span><span class="o">.</span><span class="n">auxiliary_circle</span><span class="p">()</span>
<span class="go">Circle(Point2D(1, 2), 8)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">a</span><span class="p">,</span> <span class="n">b</span> <span class="o">=</span> <span class="n">symbols</span><span class="p">(</span><span class="s1">&#39;a b&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">Ellipse</span><span class="p">(</span><span class="n">c</span><span class="p">,</span> <span class="n">a</span><span class="p">,</span> <span class="n">b</span><span class="p">)</span><span class="o">.</span><span class="n">auxiliary_circle</span><span class="p">()</span>
<span class="go">Circle(Point2D(1, 2), Max(a, b))</span>
</pre></div>
</div>
</dd></dl>

<dl class="py property">
<dt class="sig sig-object py" id="sympy.geometry.ellipse.Ellipse.bounds">
<em class="property"><span class="pre">property</span> </em><span class="sig-name descname"><span class="pre">bounds</span></span><a class="headerlink" href="#sympy.geometry.ellipse.Ellipse.bounds" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a tuple (xmin, ymin, xmax, ymax) representing the bounding
rectangle for the geometric figure.</p>
</dd></dl>

<dl class="py property">
<dt class="sig sig-object py" id="sympy.geometry.ellipse.Ellipse.center">
<em class="property"><span class="pre">property</span> </em><span class="sig-name descname"><span class="pre">center</span></span><a class="headerlink" href="#sympy.geometry.ellipse.Ellipse.center" title="Permalink to this definition">¶</a></dt>
<dd><p>The center of the ellipse.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p><strong>center</strong> : number</p>
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">Point</span><span class="p">,</span> <span class="n">Ellipse</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">p1</span> <span class="o">=</span> <span class="n">Point</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e1</span> <span class="o">=</span> <span class="n">Ellipse</span><span class="p">(</span><span class="n">p1</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e1</span><span class="o">.</span><span class="n">center</span>
<span class="go">Point2D(0, 0)</span>
</pre></div>
</div>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="points.html#sympy.geometry.point.Point" title="sympy.geometry.point.Point"><code class="xref py py-obj docutils literal notranslate"><span class="pre">sympy.geometry.point.Point</span></code></a></p>
</div>
</dd></dl>

<dl class="py property">
<dt class="sig sig-object py" id="sympy.geometry.ellipse.Ellipse.circumference">
<em class="property"><span class="pre">property</span> </em><span class="sig-name descname"><span class="pre">circumference</span></span><a class="headerlink" href="#sympy.geometry.ellipse.Ellipse.circumference" title="Permalink to this definition">¶</a></dt>
<dd><p>The circumference of the ellipse.</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">Point</span><span class="p">,</span> <span class="n">Ellipse</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">p1</span> <span class="o">=</span> <span class="n">Point</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e1</span> <span class="o">=</span> <span class="n">Ellipse</span><span class="p">(</span><span class="n">p1</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e1</span><span class="o">.</span><span class="n">circumference</span>
<span class="go">12*elliptic_e(8/9)</span>
</pre></div>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.geometry.ellipse.Ellipse.director_circle">
<span class="sig-name descname"><span class="pre">director_circle</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/geometry/ellipse.py#L1034-L1062"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.geometry.ellipse.Ellipse.director_circle" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a Circle consisting of all points where two perpendicular
tangent lines to the ellipse cross each other.</p>
<dl class="field-list">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>Circle</p>
<blockquote>
<div><p>A director circle returned as a geometric object.</p>
</div></blockquote>
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">Ellipse</span><span class="p">,</span> <span class="n">Point</span><span class="p">,</span> <span class="n">symbols</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span> <span class="o">=</span> <span class="n">Point</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span><span class="mi">8</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">Ellipse</span><span class="p">(</span><span class="n">c</span><span class="p">,</span> <span class="mi">7</span><span class="p">,</span> <span class="mi">9</span><span class="p">)</span><span class="o">.</span><span class="n">director_circle</span><span class="p">()</span>
<span class="go">Circle(Point2D(3, 8), sqrt(130))</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">a</span><span class="p">,</span> <span class="n">b</span> <span class="o">=</span> <span class="n">symbols</span><span class="p">(</span><span class="s1">&#39;a b&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">Ellipse</span><span class="p">(</span><span class="n">c</span><span class="p">,</span> <span class="n">a</span><span class="p">,</span> <span class="n">b</span><span class="p">)</span><span class="o">.</span><span class="n">director_circle</span><span class="p">()</span>
<span class="go">Circle(Point2D(3, 8), sqrt(a**2 + b**2))</span>
</pre></div>
</div>
<p class="rubric">References</p>
<dl class="citation">
<dt class="label" id="r483"><span class="brackets"><a class="fn-backref" href="#id1">R483</a></span></dt>
<dd><p><a class="reference external" href="https://en.wikipedia.org/wiki/Director_circle">https://en.wikipedia.org/wiki/Director_circle</a></p>
</dd>
</dl>
</dd></dl>

<dl class="py property">
<dt class="sig sig-object py" id="sympy.geometry.ellipse.Ellipse.eccentricity">
<em class="property"><span class="pre">property</span> </em><span class="sig-name descname"><span class="pre">eccentricity</span></span><a class="headerlink" href="#sympy.geometry.ellipse.Ellipse.eccentricity" title="Permalink to this definition">¶</a></dt>
<dd><p>The eccentricity of the ellipse.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p><strong>eccentricity</strong> : number</p>
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">Point</span><span class="p">,</span> <span class="n">Ellipse</span><span class="p">,</span> <span class="n">sqrt</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">p1</span> <span class="o">=</span> <span class="n">Point</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e1</span> <span class="o">=</span> <span class="n">Ellipse</span><span class="p">(</span><span class="n">p1</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="n">sqrt</span><span class="p">(</span><span class="mi">2</span><span class="p">))</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e1</span><span class="o">.</span><span class="n">eccentricity</span>
<span class="go">sqrt(7)/3</span>
</pre></div>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.geometry.ellipse.Ellipse.encloses_point">
<span class="sig-name descname"><span class="pre">encloses_point</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">p</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/geometry/ellipse.py#L356-L407"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.geometry.ellipse.Ellipse.encloses_point" title="Permalink to this definition">¶</a></dt>
<dd><p>Return True if p is enclosed by (is inside of) self.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>p</strong> : Point</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><strong>encloses_point</strong> : True, False or None</p>
</dd>
</dl>
<p class="rubric">Notes</p>
<p>Being on the border of self is considered False.</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">Ellipse</span><span class="p">,</span> <span class="n">S</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.abc</span> <span class="kn">import</span> <span class="n">t</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e</span> <span class="o">=</span> <span class="n">Ellipse</span><span class="p">((</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">2</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e</span><span class="o">.</span><span class="n">encloses_point</span><span class="p">((</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">))</span>
<span class="go">True</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e</span><span class="o">.</span><span class="n">encloses_point</span><span class="p">(</span><span class="n">e</span><span class="o">.</span><span class="n">arbitrary_point</span><span class="p">(</span><span class="n">t</span><span class="p">)</span><span class="o">.</span><span class="n">subs</span><span class="p">(</span><span class="n">t</span><span class="p">,</span> <span class="n">S</span><span class="o">.</span><span class="n">Half</span><span class="p">))</span>
<span class="go">False</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e</span><span class="o">.</span><span class="n">encloses_point</span><span class="p">((</span><span class="mi">4</span><span class="p">,</span> <span class="mi">0</span><span class="p">))</span>
<span class="go">False</span>
</pre></div>
</div>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="points.html#sympy.geometry.point.Point" title="sympy.geometry.point.Point"><code class="xref py py-obj docutils literal notranslate"><span class="pre">sympy.geometry.point.Point</span></code></a></p>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.geometry.ellipse.Ellipse.equation">
<span class="sig-name descname"><span class="pre">equation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'x'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'y'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">_slope</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/geometry/ellipse.py#L409-L483"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.geometry.ellipse.Ellipse.equation" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the equation of an ellipse aligned with the x and y axes;
when slope is given, the equation returned corresponds to an ellipse
with a major axis having that slope.</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>x</strong> : str, optional</p>
<blockquote>
<div><p>Label for the x-axis. Default value is ‘x’.</p>
</div></blockquote>
<p><strong>y</strong> : str, optional</p>
<blockquote>
<div><p>Label for the y-axis. Default value is ‘y’.</p>
</div></blockquote>
<p><strong>_slope</strong> : Expr, optional</p>
<blockquote>
<div><p>The slope of the major axis. Ignored when ‘None’.</p>
</div></blockquote>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><strong>equation</strong> : sympy expression</p>
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">Point</span><span class="p">,</span> <span class="n">Ellipse</span><span class="p">,</span> <span class="n">pi</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.abc</span> <span class="kn">import</span> <span class="n">x</span><span class="p">,</span> <span class="n">y</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e1</span> <span class="o">=</span> <span class="n">Ellipse</span><span class="p">(</span><span class="n">Point</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">2</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">eq1</span> <span class="o">=</span> <span class="n">e1</span><span class="o">.</span><span class="n">equation</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">);</span> <span class="n">eq1</span>
<span class="go">y**2/4 + (x/3 - 1/3)**2 - 1</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">eq2</span> <span class="o">=</span> <span class="n">e1</span><span class="o">.</span><span class="n">equation</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">,</span> <span class="n">_slope</span><span class="o">=</span><span class="mi">1</span><span class="p">);</span> <span class="n">eq2</span>
<span class="go">(-x + y + 1)**2/8 + (x + y - 1)**2/18 - 1</span>
</pre></div>
</div>
<p>A point on e1 satisfies eq1. Let’s use one on the x-axis:</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">p1</span> <span class="o">=</span> <span class="n">e1</span><span class="o">.</span><span class="n">center</span> <span class="o">+</span> <span class="n">Point</span><span class="p">(</span><span class="n">e1</span><span class="o">.</span><span class="n">major</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="k">assert</span> <span class="n">eq1</span><span class="o">.</span><span class="n">subs</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">p1</span><span class="o">.</span><span class="n">x</span><span class="p">)</span><span class="o">.</span><span class="n">subs</span><span class="p">(</span><span class="n">y</span><span class="p">,</span> <span class="n">p1</span><span class="o">.</span><span class="n">y</span><span class="p">)</span> <span class="o">==</span> <span class="mi">0</span>
</pre></div>
</div>
<p>When rotated the same as the rotated ellipse, about the center
point of the ellipse, it will satisfy the rotated ellipse’s
equation, too:</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">r1</span> <span class="o">=</span> <span class="n">p1</span><span class="o">.</span><span class="n">rotate</span><span class="p">(</span><span class="n">pi</span><span class="o">/</span><span class="mi">4</span><span class="p">,</span> <span class="n">e1</span><span class="o">.</span><span class="n">center</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="k">assert</span> <span class="n">eq2</span><span class="o">.</span><span class="n">subs</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">r1</span><span class="o">.</span><span class="n">x</span><span class="p">)</span><span class="o">.</span><span class="n">subs</span><span class="p">(</span><span class="n">y</span><span class="p">,</span> <span class="n">r1</span><span class="o">.</span><span class="n">y</span><span class="p">)</span> <span class="o">==</span> <span class="mi">0</span>
</pre></div>
</div>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<dl class="simple">
<dt><a class="reference internal" href="#sympy.geometry.ellipse.Ellipse.arbitrary_point" title="sympy.geometry.ellipse.Ellipse.arbitrary_point"><code class="xref py py-obj docutils literal notranslate"><span class="pre">arbitrary_point</span></code></a></dt><dd><p>Returns parameterized point on ellipse</p>
</dd>
</dl>
</div>
<p class="rubric">References</p>
<dl class="citation">
<dt class="label" id="r484"><span class="brackets"><a class="fn-backref" href="#id2">R484</a></span></dt>
<dd><p><a class="reference external" href="https://math.stackexchange.com/questions/108270/what-is-the-equation-of-an-ellipse-that-is-not-aligned-with-the-axis">https://math.stackexchange.com/questions/108270/what-is-the-equation-of-an-ellipse-that-is-not-aligned-with-the-axis</a></p>
</dd>
<dt class="label" id="r485"><span class="brackets"><a class="fn-backref" href="#id3">R485</a></span></dt>
<dd><p><a class="reference external" href="https://en.wikipedia.org/wiki/Ellipse#Equation_of_a_shifted_ellipse">https://en.wikipedia.org/wiki/Ellipse#Equation_of_a_shifted_ellipse</a></p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.geometry.ellipse.Ellipse.evolute">
<span class="sig-name descname"><span class="pre">evolute</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'x'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'y'</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/geometry/ellipse.py#L485-L515"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.geometry.ellipse.Ellipse.evolute" title="Permalink to this definition">¶</a></dt>
<dd><p>The equation of evolute of the ellipse.</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>x</strong> : str, optional</p>
<blockquote>
<div><p>Label for the x-axis. Default value is ‘x’.</p>
</div></blockquote>
<p><strong>y</strong> : str, optional</p>
<blockquote>
<div><p>Label for the y-axis. Default value is ‘y’.</p>
</div></blockquote>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><strong>equation</strong> : sympy expression</p>
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">Point</span><span class="p">,</span> <span class="n">Ellipse</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e1</span> <span class="o">=</span> <span class="n">Ellipse</span><span class="p">(</span><span class="n">Point</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">2</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e1</span><span class="o">.</span><span class="n">evolute</span><span class="p">()</span>
<span class="go">2**(2/3)*y**(2/3) + (3*x - 3)**(2/3) - 5**(2/3)</span>
</pre></div>
</div>
</dd></dl>

<dl class="py property">
<dt class="sig sig-object py" id="sympy.geometry.ellipse.Ellipse.foci">
<em class="property"><span class="pre">property</span> </em><span class="sig-name descname"><span class="pre">foci</span></span><a class="headerlink" href="#sympy.geometry.ellipse.Ellipse.foci" title="Permalink to this definition">¶</a></dt>
<dd><p>The foci of the ellipse.</p>
<dl class="field-list">
<dt class="field-odd">Raises</dt>
<dd class="field-odd"><p><strong>ValueError</strong></p>
<blockquote>
<div><p>When the major and minor axis cannot be determined.</p>
</div></blockquote>
</dd>
</dl>
<p class="rubric">Notes</p>
<p>The foci can only be calculated if the major/minor axes are known.</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">Point</span><span class="p">,</span> <span class="n">Ellipse</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">p1</span> <span class="o">=</span> <span class="n">Point</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e1</span> <span class="o">=</span> <span class="n">Ellipse</span><span class="p">(</span><span class="n">p1</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e1</span><span class="o">.</span><span class="n">foci</span>
<span class="go">(Point2D(-2*sqrt(2), 0), Point2D(2*sqrt(2), 0))</span>
</pre></div>
</div>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="points.html#sympy.geometry.point.Point" title="sympy.geometry.point.Point"><code class="xref py py-obj docutils literal notranslate"><span class="pre">sympy.geometry.point.Point</span></code></a></p>
<dl class="simple">
<dt><a class="reference internal" href="#sympy.geometry.ellipse.Ellipse.focus_distance" title="sympy.geometry.ellipse.Ellipse.focus_distance"><code class="xref py py-obj docutils literal notranslate"><span class="pre">focus_distance</span></code></a></dt><dd><p>Returns the distance between focus and center</p>
</dd>
</dl>
</div>
</dd></dl>

<dl class="py property">
<dt class="sig sig-object py" id="sympy.geometry.ellipse.Ellipse.focus_distance">
<em class="property"><span class="pre">property</span> </em><span class="sig-name descname"><span class="pre">focus_distance</span></span><a class="headerlink" href="#sympy.geometry.ellipse.Ellipse.focus_distance" title="Permalink to this definition">¶</a></dt>
<dd><p>The focal distance of the ellipse.</p>
<p>The distance between the center and one focus.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p><strong>focus_distance</strong> : number</p>
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">Point</span><span class="p">,</span> <span class="n">Ellipse</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">p1</span> <span class="o">=</span> <span class="n">Point</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e1</span> <span class="o">=</span> <span class="n">Ellipse</span><span class="p">(</span><span class="n">p1</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e1</span><span class="o">.</span><span class="n">focus_distance</span>
<span class="go">2*sqrt(2)</span>
</pre></div>
</div>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="#sympy.geometry.ellipse.Ellipse.foci" title="sympy.geometry.ellipse.Ellipse.foci"><code class="xref py py-obj docutils literal notranslate"><span class="pre">foci</span></code></a></p>
</div>
</dd></dl>

<dl class="py property">
<dt class="sig sig-object py" id="sympy.geometry.ellipse.Ellipse.hradius">
<em class="property"><span class="pre">property</span> </em><span class="sig-name descname"><span class="pre">hradius</span></span><a class="headerlink" href="#sympy.geometry.ellipse.Ellipse.hradius" title="Permalink to this definition">¶</a></dt>
<dd><p>The horizontal radius of the ellipse.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p><strong>hradius</strong> : number</p>
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">Point</span><span class="p">,</span> <span class="n">Ellipse</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">p1</span> <span class="o">=</span> <span class="n">Point</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e1</span> <span class="o">=</span> <span class="n">Ellipse</span><span class="p">(</span><span class="n">p1</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e1</span><span class="o">.</span><span class="n">hradius</span>
<span class="go">3</span>
</pre></div>
</div>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="#sympy.geometry.ellipse.Ellipse.vradius" title="sympy.geometry.ellipse.Ellipse.vradius"><code class="xref py py-obj docutils literal notranslate"><span class="pre">vradius</span></code></a>, <a class="reference internal" href="#sympy.geometry.ellipse.Ellipse.major" title="sympy.geometry.ellipse.Ellipse.major"><code class="xref py py-obj docutils literal notranslate"><span class="pre">major</span></code></a>, <a class="reference internal" href="#sympy.geometry.ellipse.Ellipse.minor" title="sympy.geometry.ellipse.Ellipse.minor"><code class="xref py py-obj docutils literal notranslate"><span class="pre">minor</span></code></a></p>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.geometry.ellipse.Ellipse.intersection">
<span class="sig-name descname"><span class="pre">intersection</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">o</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/geometry/ellipse.py#L616-L694"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.geometry.ellipse.Ellipse.intersection" title="Permalink to this definition">¶</a></dt>
<dd><p>The intersection of this ellipse and another geometrical entity
<span class="math notranslate nohighlight">\(o\)</span>.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>o</strong> : GeometryEntity</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><strong>intersection</strong> : list of GeometryEntity objects</p>
</dd>
</dl>
<p class="rubric">Notes</p>
<p>Currently supports intersections with Point, Line, Segment, Ray,
Circle and Ellipse types.</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">Ellipse</span><span class="p">,</span> <span class="n">Point</span><span class="p">,</span> <span class="n">Line</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e</span> <span class="o">=</span> <span class="n">Ellipse</span><span class="p">(</span><span class="n">Point</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span> <span class="mi">5</span><span class="p">,</span> <span class="mi">7</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e</span><span class="o">.</span><span class="n">intersection</span><span class="p">(</span><span class="n">Point</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">))</span>
<span class="go">[]</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e</span><span class="o">.</span><span class="n">intersection</span><span class="p">(</span><span class="n">Point</span><span class="p">(</span><span class="mi">5</span><span class="p">,</span> <span class="mi">0</span><span class="p">))</span>
<span class="go">[Point2D(5, 0)]</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e</span><span class="o">.</span><span class="n">intersection</span><span class="p">(</span><span class="n">Line</span><span class="p">(</span><span class="n">Point</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="mi">0</span><span class="p">),</span> <span class="n">Point</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">)))</span>
<span class="go">[Point2D(0, -7), Point2D(0, 7)]</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e</span><span class="o">.</span><span class="n">intersection</span><span class="p">(</span><span class="n">Line</span><span class="p">(</span><span class="n">Point</span><span class="p">(</span><span class="mi">5</span><span class="p">,</span><span class="mi">0</span><span class="p">),</span> <span class="n">Point</span><span class="p">(</span><span class="mi">5</span><span class="p">,</span> <span class="mi">1</span><span class="p">)))</span>
<span class="go">[Point2D(5, 0)]</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e</span><span class="o">.</span><span class="n">intersection</span><span class="p">(</span><span class="n">Line</span><span class="p">(</span><span class="n">Point</span><span class="p">(</span><span class="mi">6</span><span class="p">,</span><span class="mi">0</span><span class="p">),</span> <span class="n">Point</span><span class="p">(</span><span class="mi">6</span><span class="p">,</span> <span class="mi">1</span><span class="p">)))</span>
<span class="go">[]</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e</span> <span class="o">=</span> <span class="n">Ellipse</span><span class="p">(</span><span class="n">Point</span><span class="p">(</span><span class="o">-</span><span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">3</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e</span><span class="o">.</span><span class="n">intersection</span><span class="p">(</span><span class="n">Ellipse</span><span class="p">(</span><span class="n">Point</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">3</span><span class="p">))</span>
<span class="go">[Point2D(0, -3*sqrt(15)/4), Point2D(0, 3*sqrt(15)/4)]</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e</span><span class="o">.</span><span class="n">intersection</span><span class="p">(</span><span class="n">Ellipse</span><span class="p">(</span><span class="n">Point</span><span class="p">(</span><span class="mi">5</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">3</span><span class="p">))</span>
<span class="go">[Point2D(2, -3*sqrt(7)/4), Point2D(2, 3*sqrt(7)/4)]</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e</span><span class="o">.</span><span class="n">intersection</span><span class="p">(</span><span class="n">Ellipse</span><span class="p">(</span><span class="n">Point</span><span class="p">(</span><span class="mi">100500</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">3</span><span class="p">))</span>
<span class="go">[]</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e</span><span class="o">.</span><span class="n">intersection</span><span class="p">(</span><span class="n">Ellipse</span><span class="p">(</span><span class="n">Point</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">))</span>
<span class="go">[Point2D(3, 0), Point2D(-363/175, -48*sqrt(111)/175), Point2D(-363/175, 48*sqrt(111)/175)]</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e</span><span class="o">.</span><span class="n">intersection</span><span class="p">(</span><span class="n">Ellipse</span><span class="p">(</span><span class="n">Point</span><span class="p">(</span><span class="o">-</span><span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">))</span>
<span class="go">[Point2D(-17/5, -12/5), Point2D(-17/5, 12/5), Point2D(7/5, -12/5), Point2D(7/5, 12/5)]</span>
</pre></div>
</div>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="entities.html#sympy.geometry.entity.GeometryEntity" title="sympy.geometry.entity.GeometryEntity"><code class="xref py py-obj docutils literal notranslate"><span class="pre">sympy.geometry.entity.GeometryEntity</span></code></a></p>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.geometry.ellipse.Ellipse.is_tangent">
<span class="sig-name descname"><span class="pre">is_tangent</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">o</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/geometry/ellipse.py#L696-L775"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.geometry.ellipse.Ellipse.is_tangent" title="Permalink to this definition">¶</a></dt>
<dd><p>Is <span class="math notranslate nohighlight">\(o\)</span> tangent to the ellipse?</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>o</strong> : GeometryEntity</p>
<blockquote>
<div><p>An Ellipse, LinearEntity or Polygon</p>
</div></blockquote>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>is_tangent: boolean</p>
<blockquote>
<div><p>True if o is tangent to the ellipse, False otherwise.</p>
</div></blockquote>
</dd>
<dt class="field-odd">Raises</dt>
<dd class="field-odd"><p><strong>NotImplementedError</strong></p>
<blockquote>
<div><p>When the wrong type of argument is supplied.</p>
</div></blockquote>
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">Point</span><span class="p">,</span> <span class="n">Ellipse</span><span class="p">,</span> <span class="n">Line</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">p0</span><span class="p">,</span> <span class="n">p1</span><span class="p">,</span> <span class="n">p2</span> <span class="o">=</span> <span class="n">Point</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span> <span class="n">Point</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span> <span class="n">Point</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="mi">3</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e1</span> <span class="o">=</span> <span class="n">Ellipse</span><span class="p">(</span><span class="n">p0</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">2</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">l1</span> <span class="o">=</span> <span class="n">Line</span><span class="p">(</span><span class="n">p1</span><span class="p">,</span> <span class="n">p2</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e1</span><span class="o">.</span><span class="n">is_tangent</span><span class="p">(</span><span class="n">l1</span><span class="p">)</span>
<span class="go">True</span>
</pre></div>
</div>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="#sympy.geometry.ellipse.Ellipse.tangent_lines" title="sympy.geometry.ellipse.Ellipse.tangent_lines"><code class="xref py py-obj docutils literal notranslate"><span class="pre">tangent_lines</span></code></a></p>
</div>
</dd></dl>

<dl class="py property">
<dt class="sig sig-object py" id="sympy.geometry.ellipse.Ellipse.major">
<em class="property"><span class="pre">property</span> </em><span class="sig-name descname"><span class="pre">major</span></span><a class="headerlink" href="#sympy.geometry.ellipse.Ellipse.major" title="Permalink to this definition">¶</a></dt>
<dd><p>Longer axis of the ellipse (if it can be determined) else hradius.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p><strong>major</strong> : number or expression</p>
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">Point</span><span class="p">,</span> <span class="n">Ellipse</span><span class="p">,</span> <span class="n">Symbol</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">p1</span> <span class="o">=</span> <span class="n">Point</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e1</span> <span class="o">=</span> <span class="n">Ellipse</span><span class="p">(</span><span class="n">p1</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e1</span><span class="o">.</span><span class="n">major</span>
<span class="go">3</span>
</pre></div>
</div>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">a</span> <span class="o">=</span> <span class="n">Symbol</span><span class="p">(</span><span class="s1">&#39;a&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">b</span> <span class="o">=</span> <span class="n">Symbol</span><span class="p">(</span><span class="s1">&#39;b&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">Ellipse</span><span class="p">(</span><span class="n">p1</span><span class="p">,</span> <span class="n">a</span><span class="p">,</span> <span class="n">b</span><span class="p">)</span><span class="o">.</span><span class="n">major</span>
<span class="go">a</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">Ellipse</span><span class="p">(</span><span class="n">p1</span><span class="p">,</span> <span class="n">b</span><span class="p">,</span> <span class="n">a</span><span class="p">)</span><span class="o">.</span><span class="n">major</span>
<span class="go">b</span>
</pre></div>
</div>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">m</span> <span class="o">=</span> <span class="n">Symbol</span><span class="p">(</span><span class="s1">&#39;m&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">M</span> <span class="o">=</span> <span class="n">m</span> <span class="o">+</span> <span class="mi">1</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">Ellipse</span><span class="p">(</span><span class="n">p1</span><span class="p">,</span> <span class="n">m</span><span class="p">,</span> <span class="n">M</span><span class="p">)</span><span class="o">.</span><span class="n">major</span>
<span class="go">m + 1</span>
</pre></div>
</div>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="#sympy.geometry.ellipse.Ellipse.hradius" title="sympy.geometry.ellipse.Ellipse.hradius"><code class="xref py py-obj docutils literal notranslate"><span class="pre">hradius</span></code></a>, <a class="reference internal" href="#sympy.geometry.ellipse.Ellipse.vradius" title="sympy.geometry.ellipse.Ellipse.vradius"><code class="xref py py-obj docutils literal notranslate"><span class="pre">vradius</span></code></a>, <a class="reference internal" href="#sympy.geometry.ellipse.Ellipse.minor" title="sympy.geometry.ellipse.Ellipse.minor"><code class="xref py py-obj docutils literal notranslate"><span class="pre">minor</span></code></a></p>
</div>
</dd></dl>

<dl class="py property">
<dt class="sig sig-object py" id="sympy.geometry.ellipse.Ellipse.minor">
<em class="property"><span class="pre">property</span> </em><span class="sig-name descname"><span class="pre">minor</span></span><a class="headerlink" href="#sympy.geometry.ellipse.Ellipse.minor" title="Permalink to this definition">¶</a></dt>
<dd><p>Shorter axis of the ellipse (if it can be determined) else vradius.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p><strong>minor</strong> : number or expression</p>
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">Point</span><span class="p">,</span> <span class="n">Ellipse</span><span class="p">,</span> <span class="n">Symbol</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">p1</span> <span class="o">=</span> <span class="n">Point</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e1</span> <span class="o">=</span> <span class="n">Ellipse</span><span class="p">(</span><span class="n">p1</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e1</span><span class="o">.</span><span class="n">minor</span>
<span class="go">1</span>
</pre></div>
</div>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">a</span> <span class="o">=</span> <span class="n">Symbol</span><span class="p">(</span><span class="s1">&#39;a&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">b</span> <span class="o">=</span> <span class="n">Symbol</span><span class="p">(</span><span class="s1">&#39;b&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">Ellipse</span><span class="p">(</span><span class="n">p1</span><span class="p">,</span> <span class="n">a</span><span class="p">,</span> <span class="n">b</span><span class="p">)</span><span class="o">.</span><span class="n">minor</span>
<span class="go">b</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">Ellipse</span><span class="p">(</span><span class="n">p1</span><span class="p">,</span> <span class="n">b</span><span class="p">,</span> <span class="n">a</span><span class="p">)</span><span class="o">.</span><span class="n">minor</span>
<span class="go">a</span>
</pre></div>
</div>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">m</span> <span class="o">=</span> <span class="n">Symbol</span><span class="p">(</span><span class="s1">&#39;m&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">M</span> <span class="o">=</span> <span class="n">m</span> <span class="o">+</span> <span class="mi">1</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">Ellipse</span><span class="p">(</span><span class="n">p1</span><span class="p">,</span> <span class="n">m</span><span class="p">,</span> <span class="n">M</span><span class="p">)</span><span class="o">.</span><span class="n">minor</span>
<span class="go">m</span>
</pre></div>
</div>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="#sympy.geometry.ellipse.Ellipse.hradius" title="sympy.geometry.ellipse.Ellipse.hradius"><code class="xref py py-obj docutils literal notranslate"><span class="pre">hradius</span></code></a>, <a class="reference internal" href="#sympy.geometry.ellipse.Ellipse.vradius" title="sympy.geometry.ellipse.Ellipse.vradius"><code class="xref py py-obj docutils literal notranslate"><span class="pre">vradius</span></code></a>, <a class="reference internal" href="#sympy.geometry.ellipse.Ellipse.major" title="sympy.geometry.ellipse.Ellipse.major"><code class="xref py py-obj docutils literal notranslate"><span class="pre">major</span></code></a></p>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.geometry.ellipse.Ellipse.normal_lines">
<span class="sig-name descname"><span class="pre">normal_lines</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">p</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">prec</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/geometry/ellipse.py#L871-L950"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.geometry.ellipse.Ellipse.normal_lines" title="Permalink to this definition">¶</a></dt>
<dd><p>Normal lines between <span class="math notranslate nohighlight">\(p\)</span> and the ellipse.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>p</strong> : Point</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><strong>normal_lines</strong> : list with 1, 2 or 4 Lines</p>
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">Point</span><span class="p">,</span> <span class="n">Ellipse</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e</span> <span class="o">=</span> <span class="n">Ellipse</span><span class="p">((</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span> <span class="o">=</span> <span class="n">e</span><span class="o">.</span><span class="n">center</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e</span><span class="o">.</span><span class="n">normal_lines</span><span class="p">(</span><span class="n">c</span> <span class="o">+</span> <span class="n">Point</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">))</span>
<span class="go">[Line2D(Point2D(0, 0), Point2D(1, 0))]</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e</span><span class="o">.</span><span class="n">normal_lines</span><span class="p">(</span><span class="n">c</span><span class="p">)</span>
<span class="go">[Line2D(Point2D(0, 0), Point2D(0, 1)), Line2D(Point2D(0, 0), Point2D(1, 0))]</span>
</pre></div>
</div>
<p>Off-axis points require the solution of a quartic equation. This
often leads to very large expressions that may be of little practical
use. An approximate solution of <span class="math notranslate nohighlight">\(prec\)</span> digits can be obtained by
passing in the desired value:</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">e</span><span class="o">.</span><span class="n">normal_lines</span><span class="p">((</span><span class="mi">3</span><span class="p">,</span> <span class="mi">3</span><span class="p">),</span> <span class="n">prec</span><span class="o">=</span><span class="mi">2</span><span class="p">)</span>
<span class="go">[Line2D(Point2D(-0.81, -2.7), Point2D(0.19, -1.2)),</span>
<span class="go">Line2D(Point2D(1.5, -2.0), Point2D(2.5, -2.7))]</span>
</pre></div>
</div>
<p>Whereas the above solution has an operation count of 12, the exact
solution has an operation count of 2020.</p>
</dd></dl>

<dl class="py property">
<dt class="sig sig-object py" id="sympy.geometry.ellipse.Ellipse.periapsis">
<em class="property"><span class="pre">property</span> </em><span class="sig-name descname"><span class="pre">periapsis</span></span><a class="headerlink" href="#sympy.geometry.ellipse.Ellipse.periapsis" title="Permalink to this definition">¶</a></dt>
<dd><p>The periapsis of the ellipse.</p>
<p>The shortest distance between the focus and the contour.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p><strong>periapsis</strong> : number</p>
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">Point</span><span class="p">,</span> <span class="n">Ellipse</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">p1</span> <span class="o">=</span> <span class="n">Point</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e1</span> <span class="o">=</span> <span class="n">Ellipse</span><span class="p">(</span><span class="n">p1</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e1</span><span class="o">.</span><span class="n">periapsis</span>
<span class="go">3 - 2*sqrt(2)</span>
</pre></div>
</div>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<dl class="simple">
<dt><a class="reference internal" href="#sympy.geometry.ellipse.Ellipse.apoapsis" title="sympy.geometry.ellipse.Ellipse.apoapsis"><code class="xref py py-obj docutils literal notranslate"><span class="pre">apoapsis</span></code></a></dt><dd><p>Returns greatest distance between focus and contour</p>
</dd>
</dl>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.geometry.ellipse.Ellipse.plot_interval">
<span class="sig-name descname"><span class="pre">plot_interval</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">parameter</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'t'</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/geometry/ellipse.py#L1064-L1089"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.geometry.ellipse.Ellipse.plot_interval" title="Permalink to this definition">¶</a></dt>
<dd><p>The plot interval for the default geometric plot of the Ellipse.</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>parameter</strong> : str, optional</p>
<blockquote>
<div><p>Default value is ‘t’.</p>
</div></blockquote>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><strong>plot_interval</strong> : list</p>
<blockquote>
<div><p>[parameter, lower_bound, upper_bound]</p>
</div></blockquote>
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">Point</span><span class="p">,</span> <span class="n">Ellipse</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e1</span> <span class="o">=</span> <span class="n">Ellipse</span><span class="p">(</span><span class="n">Point</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">2</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e1</span><span class="o">.</span><span class="n">plot_interval</span><span class="p">()</span>
<span class="go">[t, -pi, pi]</span>
</pre></div>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.geometry.ellipse.Ellipse.polar_second_moment_of_area">
<span class="sig-name descname"><span class="pre">polar_second_moment_of_area</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/geometry/ellipse.py#L1395-L1425"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.geometry.ellipse.Ellipse.polar_second_moment_of_area" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the polar second moment of area of an Ellipse</p>
<p>It is a constituent of the second moment of area, linked through
the perpendicular axis theorem. While the planar second moment of
area describes an object’s resistance to deflection (bending) when
subjected to a force applied to a plane parallel to the central
axis, the polar second moment of area describes an object’s
resistance to deflection when subjected to a moment applied in a
plane perpendicular to the object’s central axis (i.e. parallel to
the cross-section)</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">symbols</span><span class="p">,</span> <span class="n">Circle</span><span class="p">,</span> <span class="n">Ellipse</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span> <span class="o">=</span> <span class="n">Circle</span><span class="p">((</span><span class="mi">5</span><span class="p">,</span> <span class="mi">5</span><span class="p">),</span> <span class="mi">4</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span><span class="o">.</span><span class="n">polar_second_moment_of_area</span><span class="p">()</span>
<span class="go">128*pi</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">a</span><span class="p">,</span> <span class="n">b</span> <span class="o">=</span> <span class="n">symbols</span><span class="p">(</span><span class="s1">&#39;a, b&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e</span> <span class="o">=</span> <span class="n">Ellipse</span><span class="p">((</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span> <span class="n">a</span><span class="p">,</span> <span class="n">b</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e</span><span class="o">.</span><span class="n">polar_second_moment_of_area</span><span class="p">()</span>
<span class="go">pi*a**3*b/4 + pi*a*b**3/4</span>
</pre></div>
</div>
<p class="rubric">References</p>
<p><a class="reference external" href="https://en.wikipedia.org/wiki/Polar_moment_of_inertia">https://en.wikipedia.org/wiki/Polar_moment_of_inertia</a></p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.geometry.ellipse.Ellipse.random_point">
<span class="sig-name descname"><span class="pre">random_point</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">seed</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/geometry/ellipse.py#L1091-L1146"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.geometry.ellipse.Ellipse.random_point" title="Permalink to this definition">¶</a></dt>
<dd><p>A random point on the ellipse.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p><strong>point</strong> : Point</p>
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">Point</span><span class="p">,</span> <span class="n">Ellipse</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e1</span> <span class="o">=</span> <span class="n">Ellipse</span><span class="p">(</span><span class="n">Point</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">2</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e1</span><span class="o">.</span><span class="n">random_point</span><span class="p">()</span> <span class="c1"># gives some random point</span>
<span class="go">Point2D(...)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">p1</span> <span class="o">=</span> <span class="n">e1</span><span class="o">.</span><span class="n">random_point</span><span class="p">(</span><span class="n">seed</span><span class="o">=</span><span class="mi">0</span><span class="p">);</span> <span class="n">p1</span><span class="o">.</span><span class="n">n</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span>
<span class="go">Point2D(2.1, 1.4)</span>
</pre></div>
</div>
<p class="rubric">Notes</p>
<p>When creating a random point, one may simply replace the
parameter with a random number. When doing so, however, the
random number should be made a Rational or else the point
may not test as being in the ellipse:</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.abc</span> <span class="kn">import</span> <span class="n">t</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">Rational</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">arb</span> <span class="o">=</span> <span class="n">e1</span><span class="o">.</span><span class="n">arbitrary_point</span><span class="p">(</span><span class="n">t</span><span class="p">);</span> <span class="n">arb</span>
<span class="go">Point2D(3*cos(t), 2*sin(t))</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">arb</span><span class="o">.</span><span class="n">subs</span><span class="p">(</span><span class="n">t</span><span class="p">,</span> <span class="mf">.1</span><span class="p">)</span> <span class="ow">in</span> <span class="n">e1</span>
<span class="go">False</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">arb</span><span class="o">.</span><span class="n">subs</span><span class="p">(</span><span class="n">t</span><span class="p">,</span> <span class="n">Rational</span><span class="p">(</span><span class="mf">.1</span><span class="p">))</span> <span class="ow">in</span> <span class="n">e1</span>
<span class="go">True</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">arb</span><span class="o">.</span><span class="n">subs</span><span class="p">(</span><span class="n">t</span><span class="p">,</span> <span class="n">Rational</span><span class="p">(</span><span class="s1">&#39;.1&#39;</span><span class="p">))</span> <span class="ow">in</span> <span class="n">e1</span>
<span class="go">True</span>
</pre></div>
</div>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="points.html#sympy.geometry.point.Point" title="sympy.geometry.point.Point"><code class="xref py py-obj docutils literal notranslate"><span class="pre">sympy.geometry.point.Point</span></code></a></p>
<dl class="simple">
<dt><a class="reference internal" href="#sympy.geometry.ellipse.Ellipse.arbitrary_point" title="sympy.geometry.ellipse.Ellipse.arbitrary_point"><code class="xref py py-obj docutils literal notranslate"><span class="pre">arbitrary_point</span></code></a></dt><dd><p>Returns parameterized point on ellipse</p>
</dd>
</dl>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.geometry.ellipse.Ellipse.reflect">
<span class="sig-name descname"><span class="pre">reflect</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">line</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/geometry/ellipse.py#L1148-L1191"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.geometry.ellipse.Ellipse.reflect" title="Permalink to this definition">¶</a></dt>
<dd><p>Override GeometryEntity.reflect since the radius
is not a GeometryEntity.</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">Circle</span><span class="p">,</span> <span class="n">Line</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">Circle</span><span class="p">((</span><span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">),</span> <span class="mi">1</span><span class="p">)</span><span class="o">.</span><span class="n">reflect</span><span class="p">(</span><span class="n">Line</span><span class="p">((</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span> <span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">)))</span>
<span class="go">Circle(Point2D(1, 0), -1)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">Ellipse</span><span class="p">,</span> <span class="n">Line</span><span class="p">,</span> <span class="n">Point</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">Ellipse</span><span class="p">(</span><span class="n">Point</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">),</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">3</span><span class="p">)</span><span class="o">.</span><span class="n">reflect</span><span class="p">(</span><span class="n">Line</span><span class="p">(</span><span class="n">Point</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="o">-</span><span class="mi">4</span><span class="p">),</span> <span class="n">Point</span><span class="p">(</span><span class="mi">5</span><span class="p">,</span> <span class="mi">0</span><span class="p">)))</span>
<span class="gt">Traceback (most recent call last):</span>
<span class="c">...</span>
<span class="gr">NotImplementedError</span>:
<span class="go">General Ellipse is not supported but the equation of the reflected</span>
<span class="go">Ellipse is given by the zeros of: f(x, y) = (9*x/41 + 40*y/41 +</span>
<span class="go">37/41)**2 + (40*x/123 - 3*y/41 - 364/123)**2 - 1</span>
</pre></div>
</div>
<p class="rubric">Notes</p>
<p>Until the general ellipse (with no axis parallel to the x-axis) is
supported a NotImplemented error is raised and the equation whose
zeros define the rotated ellipse is given.</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.geometry.ellipse.Ellipse.rotate">
<span class="sig-name descname"><span class="pre">rotate</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">angle</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">pt</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/geometry/ellipse.py#L1193-L1215"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.geometry.ellipse.Ellipse.rotate" title="Permalink to this definition">¶</a></dt>
<dd><p>Rotate <code class="docutils literal notranslate"><span class="pre">angle</span></code> radians counterclockwise about Point <code class="docutils literal notranslate"><span class="pre">pt</span></code>.</p>
<p>Note: since the general ellipse is not supported, only rotations that
are integer multiples of pi/2 are allowed.</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">Ellipse</span><span class="p">,</span> <span class="n">pi</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">Ellipse</span><span class="p">((</span><span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span><span class="o">.</span><span class="n">rotate</span><span class="p">(</span><span class="n">pi</span><span class="o">/</span><span class="mi">2</span><span class="p">)</span>
<span class="go">Ellipse(Point2D(0, 1), 1, 2)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">Ellipse</span><span class="p">((</span><span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span><span class="o">.</span><span class="n">rotate</span><span class="p">(</span><span class="n">pi</span><span class="p">)</span>
<span class="go">Ellipse(Point2D(-1, 0), 2, 1)</span>
</pre></div>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.geometry.ellipse.Ellipse.scale">
<span class="sig-name descname"><span class="pre">scale</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">pt</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/geometry/ellipse.py#L1217-L1236"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.geometry.ellipse.Ellipse.scale" title="Permalink to this definition">¶</a></dt>
<dd><p>Override GeometryEntity.scale since it is the major and minor
axes which must be scaled and they are not GeometryEntities.</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">Ellipse</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">Ellipse</span><span class="p">((</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span><span class="o">.</span><span class="n">scale</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="mi">4</span><span class="p">)</span>
<span class="go">Circle(Point2D(0, 0), 4)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">Ellipse</span><span class="p">((</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span><span class="o">.</span><span class="n">scale</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span>
<span class="go">Ellipse(Point2D(0, 0), 4, 1)</span>
</pre></div>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.geometry.ellipse.Ellipse.second_moment_of_area">
<span class="sig-name descname"><span class="pre">second_moment_of_area</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">point</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/geometry/ellipse.py#L1346-L1392"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.geometry.ellipse.Ellipse.second_moment_of_area" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the second moment and product moment area of an ellipse.</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>point</strong> : Point, two-tuple of sympifiable objects, or None(default=None)</p>
<blockquote>
<div><p>point is the point about which second moment of area is to be found.
If “point=None” it will be calculated about the axis passing through the
centroid of the ellipse.</p>
</div></blockquote>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><strong>I_xx, I_yy, I_xy</strong> : number or sympy expression</p>
<blockquote>
<div><p>I_xx, I_yy are second moment of area of an ellise.
I_xy is product moment of area of an ellipse.</p>
</div></blockquote>
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">Point</span><span class="p">,</span> <span class="n">Ellipse</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">p1</span> <span class="o">=</span> <span class="n">Point</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e1</span> <span class="o">=</span> <span class="n">Ellipse</span><span class="p">(</span><span class="n">p1</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e1</span><span class="o">.</span><span class="n">second_moment_of_area</span><span class="p">()</span>
<span class="go">(3*pi/4, 27*pi/4, 0)</span>
</pre></div>
</div>
<p class="rubric">References</p>
<p><a class="reference external" href="https://en.wikipedia.org/wiki/List_of_second_moments_of_area">https://en.wikipedia.org/wiki/List_of_second_moments_of_area</a></p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.geometry.ellipse.Ellipse.section_modulus">
<span class="sig-name descname"><span class="pre">section_modulus</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">point</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/geometry/ellipse.py#L1428-L1487"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.geometry.ellipse.Ellipse.section_modulus" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a tuple with the section modulus of an ellipse</p>
<p>Section modulus is a geometric property of an ellipse defined as the
ratio of second moment of area to the distance of the extreme end of
the ellipse from the centroidal axis.</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>point</strong> : Point, two-tuple of sympifyable objects, or None(default=None)</p>
<blockquote>
<div><p>point is the point at which section modulus is to be found.
If “point=None” section modulus will be calculated for the
point farthest from the centroidal axis of the ellipse.</p>
</div></blockquote>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>S_x, S_y: numbers or SymPy expressions</p>
<blockquote>
<div><p>S_x is the section modulus with respect to the x-axis
S_y is the section modulus with respect to the y-axis
A negative sign indicates that the section modulus is
determined for a point below the centroidal axis.</p>
</div></blockquote>
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">Symbol</span><span class="p">,</span> <span class="n">Ellipse</span><span class="p">,</span> <span class="n">Circle</span><span class="p">,</span> <span class="n">Point2D</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">d</span> <span class="o">=</span> <span class="n">Symbol</span><span class="p">(</span><span class="s1">&#39;d&#39;</span><span class="p">,</span> <span class="n">positive</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span> <span class="o">=</span> <span class="n">Circle</span><span class="p">((</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span> <span class="n">d</span><span class="o">/</span><span class="mi">2</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span><span class="o">.</span><span class="n">section_modulus</span><span class="p">()</span>
<span class="go">(pi*d**3/32, pi*d**3/32)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e</span> <span class="o">=</span> <span class="n">Ellipse</span><span class="p">(</span><span class="n">Point2D</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">4</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e</span><span class="o">.</span><span class="n">section_modulus</span><span class="p">()</span>
<span class="go">(8*pi, 4*pi)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e</span><span class="o">.</span><span class="n">section_modulus</span><span class="p">((</span><span class="mi">2</span><span class="p">,</span> <span class="mi">2</span><span class="p">))</span>
<span class="go">(16*pi, 4*pi)</span>
</pre></div>
</div>
<p class="rubric">References</p>
<p><a class="reference external" href="https://en.wikipedia.org/wiki/Section_modulus">https://en.wikipedia.org/wiki/Section_modulus</a></p>
</dd></dl>

<dl class="py property">
<dt class="sig sig-object py" id="sympy.geometry.ellipse.Ellipse.semilatus_rectum">
<em class="property"><span class="pre">property</span> </em><span class="sig-name descname"><span class="pre">semilatus_rectum</span></span><a class="headerlink" href="#sympy.geometry.ellipse.Ellipse.semilatus_rectum" title="Permalink to this definition">¶</a></dt>
<dd><p>Calculates the semi-latus rectum of the Ellipse.</p>
<p>Semi-latus rectum is defined as one half of the the chord through a
focus parallel to the conic section directrix of a conic section.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p><strong>semilatus_rectum</strong> : number</p>
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">Point</span><span class="p">,</span> <span class="n">Ellipse</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">p1</span> <span class="o">=</span> <span class="n">Point</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e1</span> <span class="o">=</span> <span class="n">Ellipse</span><span class="p">(</span><span class="n">p1</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e1</span><span class="o">.</span><span class="n">semilatus_rectum</span>
<span class="go">1/3</span>
</pre></div>
</div>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<dl class="simple">
<dt><a class="reference internal" href="#sympy.geometry.ellipse.Ellipse.apoapsis" title="sympy.geometry.ellipse.Ellipse.apoapsis"><code class="xref py py-obj docutils literal notranslate"><span class="pre">apoapsis</span></code></a></dt><dd><p>Returns greatest distance between focus and contour</p>
</dd>
<dt><a class="reference internal" href="#sympy.geometry.ellipse.Ellipse.periapsis" title="sympy.geometry.ellipse.Ellipse.periapsis"><code class="xref py py-obj docutils literal notranslate"><span class="pre">periapsis</span></code></a></dt><dd><p>The shortest distance between the focus and the contour</p>
</dd>
</dl>
</div>
<p class="rubric">References</p>
<p>[1] <a class="reference external" href="http://mathworld.wolfram.com/SemilatusRectum.html">http://mathworld.wolfram.com/SemilatusRectum.html</a>
[2] <a class="reference external" href="https://en.wikipedia.org/wiki/Ellipse#Semi-latus_rectum">https://en.wikipedia.org/wiki/Ellipse#Semi-latus_rectum</a></p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.geometry.ellipse.Ellipse.tangent_lines">
<span class="sig-name descname"><span class="pre">tangent_lines</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">p</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/geometry/ellipse.py#L1238-L1317"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.geometry.ellipse.Ellipse.tangent_lines" title="Permalink to this definition">¶</a></dt>
<dd><p>Tangent lines between <span class="math notranslate nohighlight">\(p\)</span> and the ellipse.</p>
<p>If <span class="math notranslate nohighlight">\(p\)</span> is on the ellipse, returns the tangent line through point <span class="math notranslate nohighlight">\(p\)</span>.
Otherwise, returns the tangent line(s) from <span class="math notranslate nohighlight">\(p\)</span> to the ellipse, or
None if no tangent line is possible (e.g., <span class="math notranslate nohighlight">\(p\)</span> inside ellipse).</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>p</strong> : Point</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><strong>tangent_lines</strong> : list with 1 or 2 Lines</p>
</dd>
<dt class="field-odd">Raises</dt>
<dd class="field-odd"><p><strong>NotImplementedError</strong></p>
<blockquote>
<div><p>Can only find tangent lines for a point, <span class="math notranslate nohighlight">\(p\)</span>, on the ellipse.</p>
</div></blockquote>
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">Point</span><span class="p">,</span> <span class="n">Ellipse</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e1</span> <span class="o">=</span> <span class="n">Ellipse</span><span class="p">(</span><span class="n">Point</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">2</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e1</span><span class="o">.</span><span class="n">tangent_lines</span><span class="p">(</span><span class="n">Point</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="mi">0</span><span class="p">))</span>
<span class="go">[Line2D(Point2D(3, 0), Point2D(3, -12))]</span>
</pre></div>
</div>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="points.html#sympy.geometry.point.Point" title="sympy.geometry.point.Point"><code class="xref py py-obj docutils literal notranslate"><span class="pre">sympy.geometry.point.Point</span></code></a>, <a class="reference internal" href="lines.html#sympy.geometry.line.Line" title="sympy.geometry.line.Line"><code class="xref py py-obj docutils literal notranslate"><span class="pre">sympy.geometry.line.Line</span></code></a></p>
</div>
</dd></dl>

<dl class="py property">
<dt class="sig sig-object py" id="sympy.geometry.ellipse.Ellipse.vradius">
<em class="property"><span class="pre">property</span> </em><span class="sig-name descname"><span class="pre">vradius</span></span><a class="headerlink" href="#sympy.geometry.ellipse.Ellipse.vradius" title="Permalink to this definition">¶</a></dt>
<dd><p>The vertical radius of the ellipse.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p><strong>vradius</strong> : number</p>
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">Point</span><span class="p">,</span> <span class="n">Ellipse</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">p1</span> <span class="o">=</span> <span class="n">Point</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e1</span> <span class="o">=</span> <span class="n">Ellipse</span><span class="p">(</span><span class="n">p1</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e1</span><span class="o">.</span><span class="n">vradius</span>
<span class="go">1</span>
</pre></div>
</div>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="#sympy.geometry.ellipse.Ellipse.hradius" title="sympy.geometry.ellipse.Ellipse.hradius"><code class="xref py py-obj docutils literal notranslate"><span class="pre">hradius</span></code></a>, <a class="reference internal" href="#sympy.geometry.ellipse.Ellipse.major" title="sympy.geometry.ellipse.Ellipse.major"><code class="xref py py-obj docutils literal notranslate"><span class="pre">major</span></code></a>, <a class="reference internal" href="#sympy.geometry.ellipse.Ellipse.minor" title="sympy.geometry.ellipse.Ellipse.minor"><code class="xref py py-obj docutils literal notranslate"><span class="pre">minor</span></code></a></p>
</div>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="sympy.geometry.ellipse.Circle">
<em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">sympy.geometry.ellipse.</span></span><span class="sig-name descname"><span class="pre">Circle</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/geometry/ellipse.py#L1490-L1774"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.geometry.ellipse.Circle" title="Permalink to this definition">¶</a></dt>
<dd><p>A circle in space.</p>
<p>Constructed simply from a center and a radius, from three
non-collinear points, or the equation of a circle.</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>center</strong> : Point</p>
<p><strong>radius</strong> : number or sympy expression</p>
<p><strong>points</strong> : sequence of three Points</p>
<p><strong>equation</strong> : equation of a circle</p>
</dd>
<dt class="field-even">Raises</dt>
<dd class="field-even"><p><strong>GeometryError</strong></p>
<blockquote>
<div><p>When the given equation is not that of a circle.
When trying to construct circle from incorrect parameters.</p>
</div></blockquote>
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">Eq</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.geometry</span> <span class="kn">import</span> <span class="n">Point</span><span class="p">,</span> <span class="n">Circle</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.abc</span> <span class="kn">import</span> <span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">,</span> <span class="n">a</span><span class="p">,</span> <span class="n">b</span>
</pre></div>
</div>
<p>A circle constructed from a center and radius:</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">c1</span> <span class="o">=</span> <span class="n">Circle</span><span class="p">(</span><span class="n">Point</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span> <span class="mi">5</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c1</span><span class="o">.</span><span class="n">hradius</span><span class="p">,</span> <span class="n">c1</span><span class="o">.</span><span class="n">vradius</span><span class="p">,</span> <span class="n">c1</span><span class="o">.</span><span class="n">radius</span>
<span class="go">(5, 5, 5)</span>
</pre></div>
</div>
<p>A circle constructed from three points:</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">c2</span> <span class="o">=</span> <span class="n">Circle</span><span class="p">(</span><span class="n">Point</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span> <span class="n">Point</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">),</span> <span class="n">Point</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">))</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c2</span><span class="o">.</span><span class="n">hradius</span><span class="p">,</span> <span class="n">c2</span><span class="o">.</span><span class="n">vradius</span><span class="p">,</span> <span class="n">c2</span><span class="o">.</span><span class="n">radius</span><span class="p">,</span> <span class="n">c2</span><span class="o">.</span><span class="n">center</span>
<span class="go">(sqrt(2)/2, sqrt(2)/2, sqrt(2)/2, Point2D(1/2, 1/2))</span>
</pre></div>
</div>
<p>A circle can be constructed from an equation in the form
<span class="math notranslate nohighlight">\(a*x**2 + by**2 + gx + hy + c = 0\)</span>, too:</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">Circle</span><span class="p">(</span><span class="n">x</span><span class="o">**</span><span class="mi">2</span> <span class="o">+</span> <span class="n">y</span><span class="o">**</span><span class="mi">2</span> <span class="o">-</span> <span class="mi">25</span><span class="p">)</span>
<span class="go">Circle(Point2D(0, 0), 5)</span>
</pre></div>
</div>
<p>If the variables corresponding to x and y are named something
else, their name or symbol can be supplied:</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">Circle</span><span class="p">(</span><span class="n">Eq</span><span class="p">(</span><span class="n">a</span><span class="o">**</span><span class="mi">2</span> <span class="o">+</span> <span class="n">b</span><span class="o">**</span><span class="mi">2</span><span class="p">,</span> <span class="mi">25</span><span class="p">),</span> <span class="n">x</span><span class="o">=</span><span class="s1">&#39;a&#39;</span><span class="p">,</span> <span class="n">y</span><span class="o">=</span><span class="n">b</span><span class="p">)</span>
<span class="go">Circle(Point2D(0, 0), 5)</span>
</pre></div>
</div>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="#sympy.geometry.ellipse.Ellipse" title="sympy.geometry.ellipse.Ellipse"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Ellipse</span></code></a>, <a class="reference internal" href="points.html#sympy.geometry.point.Point" title="sympy.geometry.point.Point"><code class="xref py py-obj docutils literal notranslate"><span class="pre">sympy.geometry.point.Point</span></code></a></p>
</div>
<p class="rubric">Attributes</p>
<table class="docutils align-default">
<colgroup>
<col style="width: 85%" />
<col style="width: 15%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p>radius (synonymous with hradius, vradius, major and minor)</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p>circumference</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p>equation</p></td>
<td></td>
</tr>
</tbody>
</table>
<dl class="py property">
<dt class="sig sig-object py" id="sympy.geometry.ellipse.Circle.circumference">
<em class="property"><span class="pre">property</span> </em><span class="sig-name descname"><span class="pre">circumference</span></span><a class="headerlink" href="#sympy.geometry.ellipse.Circle.circumference" title="Permalink to this definition">¶</a></dt>
<dd><p>The circumference of the circle.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p><strong>circumference</strong> : number or SymPy expression</p>
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">Point</span><span class="p">,</span> <span class="n">Circle</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c1</span> <span class="o">=</span> <span class="n">Circle</span><span class="p">(</span><span class="n">Point</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">),</span> <span class="mi">6</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c1</span><span class="o">.</span><span class="n">circumference</span>
<span class="go">12*pi</span>
</pre></div>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.geometry.ellipse.Circle.equation">
<span class="sig-name descname"><span class="pre">equation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'x'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'y'</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/geometry/ellipse.py#L1628-L1657"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.geometry.ellipse.Circle.equation" title="Permalink to this definition">¶</a></dt>
<dd><p>The equation of the circle.</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>x</strong> : str or Symbol, optional</p>
<blockquote>
<div><p>Default value is ‘x’.</p>
</div></blockquote>
<p><strong>y</strong> : str or Symbol, optional</p>
<blockquote>
<div><p>Default value is ‘y’.</p>
</div></blockquote>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><strong>equation</strong> : SymPy expression</p>
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">Point</span><span class="p">,</span> <span class="n">Circle</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c1</span> <span class="o">=</span> <span class="n">Circle</span><span class="p">(</span><span class="n">Point</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span> <span class="mi">5</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c1</span><span class="o">.</span><span class="n">equation</span><span class="p">()</span>
<span class="go">x**2 + y**2 - 25</span>
</pre></div>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.geometry.ellipse.Circle.intersection">
<span class="sig-name descname"><span class="pre">intersection</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">o</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/geometry/ellipse.py#L1659-L1689"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.geometry.ellipse.Circle.intersection" title="Permalink to this definition">¶</a></dt>
<dd><p>The intersection of this circle with another geometrical entity.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>o</strong> : GeometryEntity</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><strong>intersection</strong> : list of GeometryEntities</p>
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">Point</span><span class="p">,</span> <span class="n">Circle</span><span class="p">,</span> <span class="n">Line</span><span class="p">,</span> <span class="n">Ray</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">p1</span><span class="p">,</span> <span class="n">p2</span><span class="p">,</span> <span class="n">p3</span> <span class="o">=</span> <span class="n">Point</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span> <span class="n">Point</span><span class="p">(</span><span class="mi">5</span><span class="p">,</span> <span class="mi">5</span><span class="p">),</span> <span class="n">Point</span><span class="p">(</span><span class="mi">6</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">p4</span> <span class="o">=</span> <span class="n">Point</span><span class="p">(</span><span class="mi">5</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c1</span> <span class="o">=</span> <span class="n">Circle</span><span class="p">(</span><span class="n">p1</span><span class="p">,</span> <span class="mi">5</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c1</span><span class="o">.</span><span class="n">intersection</span><span class="p">(</span><span class="n">p2</span><span class="p">)</span>
<span class="go">[]</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c1</span><span class="o">.</span><span class="n">intersection</span><span class="p">(</span><span class="n">p4</span><span class="p">)</span>
<span class="go">[Point2D(5, 0)]</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c1</span><span class="o">.</span><span class="n">intersection</span><span class="p">(</span><span class="n">Ray</span><span class="p">(</span><span class="n">p1</span><span class="p">,</span> <span class="n">p2</span><span class="p">))</span>
<span class="go">[Point2D(5*sqrt(2)/2, 5*sqrt(2)/2)]</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c1</span><span class="o">.</span><span class="n">intersection</span><span class="p">(</span><span class="n">Line</span><span class="p">(</span><span class="n">p2</span><span class="p">,</span> <span class="n">p3</span><span class="p">))</span>
<span class="go">[]</span>
</pre></div>
</div>
</dd></dl>

<dl class="py property">
<dt class="sig sig-object py" id="sympy.geometry.ellipse.Circle.radius">
<em class="property"><span class="pre">property</span> </em><span class="sig-name descname"><span class="pre">radius</span></span><a class="headerlink" href="#sympy.geometry.ellipse.Circle.radius" title="Permalink to this definition">¶</a></dt>
<dd><p>The radius of the circle.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p><strong>radius</strong> : number or sympy expression</p>
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">Point</span><span class="p">,</span> <span class="n">Circle</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c1</span> <span class="o">=</span> <span class="n">Circle</span><span class="p">(</span><span class="n">Point</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">),</span> <span class="mi">6</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c1</span><span class="o">.</span><span class="n">radius</span>
<span class="go">6</span>
</pre></div>
</div>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="#sympy.geometry.ellipse.Ellipse.major" title="sympy.geometry.ellipse.Ellipse.major"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Ellipse.major</span></code></a>, <a class="reference internal" href="#sympy.geometry.ellipse.Ellipse.minor" title="sympy.geometry.ellipse.Ellipse.minor"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Ellipse.minor</span></code></a>, <a class="reference internal" href="#sympy.geometry.ellipse.Ellipse.hradius" title="sympy.geometry.ellipse.Ellipse.hradius"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Ellipse.hradius</span></code></a>, <a class="reference internal" href="#sympy.geometry.ellipse.Ellipse.vradius" title="sympy.geometry.ellipse.Ellipse.vradius"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Ellipse.vradius</span></code></a></p>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.geometry.ellipse.Circle.reflect">
<span class="sig-name descname"><span class="pre">reflect</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">line</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/geometry/ellipse.py#L1716-L1729"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.geometry.ellipse.Circle.reflect" title="Permalink to this definition">¶</a></dt>
<dd><p>Override GeometryEntity.reflect since the radius
is not a GeometryEntity.</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">Circle</span><span class="p">,</span> <span class="n">Line</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">Circle</span><span class="p">((</span><span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">),</span> <span class="mi">1</span><span class="p">)</span><span class="o">.</span><span class="n">reflect</span><span class="p">(</span><span class="n">Line</span><span class="p">((</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span> <span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">)))</span>
<span class="go">Circle(Point2D(1, 0), -1)</span>
</pre></div>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.geometry.ellipse.Circle.scale">
<span class="sig-name descname"><span class="pre">scale</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">pt</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/geometry/ellipse.py#L1731-L1753"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.geometry.ellipse.Circle.scale" title="Permalink to this definition">¶</a></dt>
<dd><p>Override GeometryEntity.scale since the radius
is not a GeometryEntity.</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">Circle</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">Circle</span><span class="p">((</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span> <span class="mi">1</span><span class="p">)</span><span class="o">.</span><span class="n">scale</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="mi">2</span><span class="p">)</span>
<span class="go">Circle(Point2D(0, 0), 2)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">Circle</span><span class="p">((</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span> <span class="mi">1</span><span class="p">)</span><span class="o">.</span><span class="n">scale</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="mi">4</span><span class="p">)</span>
<span class="go">Ellipse(Point2D(0, 0), 2, 4)</span>
</pre></div>
</div>
</dd></dl>

<dl class="py property">
<dt class="sig sig-object py" id="sympy.geometry.ellipse.Circle.vradius">
<em class="property"><span class="pre">property</span> </em><span class="sig-name descname"><span class="pre">vradius</span></span><a class="headerlink" href="#sympy.geometry.ellipse.Circle.vradius" title="Permalink to this definition">¶</a></dt>
<dd><p>This Ellipse property is an alias for the Circle’s radius.</p>
<p>Whereas hradius, major and minor can use Ellipse’s conventions,
the vradius does not exist for a circle. It is always a positive
value in order that the Circle, like Polygons, will have an
area that can be positive or negative as determined by the sign
of the hradius.</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">Point</span><span class="p">,</span> <span class="n">Circle</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c1</span> <span class="o">=</span> <span class="n">Circle</span><span class="p">(</span><span class="n">Point</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">),</span> <span class="mi">6</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c1</span><span class="o">.</span><span class="n">vradius</span>
<span class="go">6</span>
</pre></div>
</div>
</dd></dl>

</dd></dl>

</section>


            <div class="clearer"></div>
          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
            <p class="logo"><a href="../../index.html">
              <img class="logo" src="../../_static/sympylogo.png" alt="Logo"/>
            </a></p>
  <h4>Previous topic</h4>
  <p class="topless"><a href="curves.html"
                        title="previous chapter">Curves</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="polygons.html"
                        title="next chapter">Polygons</a></p>
  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="../../_sources/modules/geometry/ellipses.rst.txt"
            rel="nofollow">Show Source</a></li>
    </ul>
   </div>
<div id="searchbox" style="display: none" role="search">
  <h3 id="searchlabel">Quick search</h3>
    <div class="searchformwrapper">
    <form class="search" action="https://docs.sympy.org/latest/search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>
    </div>
</div>
<script>$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="polygons.html" title="Polygons"
             >next</a> |</li>
        <li class="right" >
          <a href="curves.html" title="Curves"
             >previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="../../index.html">SymPy 1.9 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="../index.html" >SymPy Modules Reference</a> &#187;</li>
          <li class="nav-item nav-item-2"><a href="index.html" >Geometry</a> &#187;</li>
        <li class="nav-item nav-item-this"><a href="#">Ellipses</a></li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
        &#169; Copyright 2021 SymPy Development Team.
      Last updated on Sep 30, 2021.
      Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.1.2.
    </div>
  </body>

<!-- Mirrored from docs.sympy.org/latest/modules/geometry/ellipses.html by HTTrack Website Copier/3.x [XR&CO'2014], Sat, 15 Jan 2022 03:26:14 GMT -->
</html>